<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>transform提升元素的垂直地位</title>
    <style>
        img:nth-of-type(2){
            margin-left:-20px;
        }
    </style>
</head>
<body>
<img src="b.jpg" alt="" height="100"><img src="c.jpg" alt="" height="100">
<button id="button">点击提高图片1的层叠水平</button>
<script>
  button.onclick=function () {
    document.querySelectorAll('img')[0].style.transform = 'translateX(0)';
  }
</script>
</body>
</html>
